package edu.cuit.zhuyimeng.framework.common.security;

import com.alibaba.ttl.TransmittableThreadLocal;

/**
 * 用户信息上下文
 */
public class UserContext {

    private static final TransmittableThreadLocal<String>   threadLocal = new TransmittableThreadLocal<>();

    public static String getToken() {
        return threadLocal.get();
    }

    public static void setToken(String token) {
        threadLocal.set(token);
    }

    public static void removeToken() {
        threadLocal.remove();
    }

}
